export const figureFourOption = [{
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'shadow'
    },
    formatter: function (params) {
      let param0 = params[0];
      let param1 = params[1];
      return param0.name+"<br>"+"车辆："+param1.value+"<br>"+"占比："+param0.value + "%";
    }
  },
  xAxis: {
    type: 'category',
    axisLabel:{
      show:true,
      interval:0,
      formatter: function (params) {
        let val = "";
        if (params.length > 10) {
          val = params.substr(0, 5) + "\n" + params.substr(5, 5) + "..."
          return val;
        } else if (params.length < 10 && params > 5) {
          val = params.substr(0, 5) + "\n" + params.substr(5, 10) + "..."
          return val;
        } else {
          return params;
        }
      }
    },
    data: []
  },
  yAxis: {
    type: 'value',
    max:100,
    min:0,
    interval:20,
    axisLabel: {
      formatter: function (s) {
        return s + "%";
      }
    },
    data: ['20', '40', '60', '80', '100']
  },
  barGap:'-100%',
  series: []
},
  {
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'shadow'
      },
      formatter: function (params) {
        let param0 = params[0];
        let param1 = params[1];
        let param2 = params[2];
        return 'ECU版本：' + param0.name + '<br>' + 'ECU名称：' + param2.value + '<br>' + '车辆：' + param1.value + '<br>' + '占比：' + param0.value + '%';
      }
    },
    xAxis: {
      type: 'category',
      axisLabel: {
        interval: 0,
        formatter: function (params) {
          let val = "";
          if (params.length > 10) {
            val = params.substr(0, 5) + "\n" + params.substr(5, 5) + "..."
            return val;
          } else if (params.length < 10 && params > 5) {
            val = params.substr(0, 5) + "\n" + params.substr(5, 10) + "..."
            return val;
          } else {
            return params;
          }
        }
      },
      data: []
    },
    yAxis: {
      type: 'value',
      max:100,
      min:0,
      interval:20,
      axisLabel: {
        formatter: function (s) {
          return s + "%";
        }
      },
      data: ['20', '40', '60', '80', '100']
    },
    barGap:'-100%',
    series: []
  },
];